1. Field of the Invention
The present invention relates generally to data storage systems, and more particularly to network file servers. In particular, the present invention relates to a data storage network in which file locks and file metadata are distributed to clients and the clients are responsible for respecting the file locks when accessing file data.
2. Description of the Related Art
Mainframe data processing, and more recently distributed computing, have required increasingly large amounts of data storage. This data storage is most economically provided by an array of low-cost disk drives integrated with a large semiconductor cache memory. Such cached disk arrays were originally introduced for use with IBM host computers. A channel director in the cached disk array executed channel commands received over a channel from the host computer.
More recently, the cached disk array has been interfaced to a data network via at least one data mover computer. The data mover computer receives data access commands from clients in the data network in accordance with a network file access protocol such as the Network File System (NFS). (NFS is described, for example, in RFC 1094, Sun Microsystems, Inc., xe2x80x9cNFS: Network File Systems Protocol Specification,xe2x80x9d Mar. 1, 1989.) The data mover computer performs file locking management and mapping of the network files to logical block addresses of storage in the cached disk storage subsystem, and moves data between the client and the storage in the cached disk storage subsystem.
In relatively large networks, it is desirable to have multiple data mover computers that access one or more cached disk storage subsystems. Each data mover computer provides at least one network port for servicing client requests. Each data mover computer is relatively inexpensive compared to a cached disk storage subsystem. Therefore, multiple data movers can be added easily until the cached disk storage subsystem becomes a bottleneck to data access. If additional storage capacity or performance is needed, an additional cached disk storage subsystem can be added. Such a storage system is described in Vishlitzky et al. U.S. Pat. 5,737,747 issued Apr. 7, 1998, entitled xe2x80x9cPrefetching to Service Multiple Video Streams from an Integrated Cached Disk Array,xe2x80x9d incorporated herein by reference.
Unfortunately, data consistency problems may arise if concurrent client access to a read/write file is permitted through more than one data mover. These data consistency problems can be solved in a number of ways. For example, as described in Vahalia et al., U.S. Pat. 5,893,140 issued Apr. 6, 1999, entitled xe2x80x9cFile Server Having a File System Cache and Protocol for Truly Safe Asynchronous Writes,xe2x80x9d incorporated herein by reference, locking information can be stored in the cached disk array, or cached in the data mover computers if a cache coherency scheme is used to maintain consistent locking data in the caches of the data mover computers.
Another known solution to the data consistency problem is to access each file system through only one data mover computer. The data mover through which the file system is accessible is said to own the file system. If a data mover computer receives a request for access to a file system that is owned by another data mover computer, then the request is forwarded to the data mover that owns the file system. Although it is relatively easy to forward data access requests from one data mover to another, this scheme is rather costly in terms of system resources to pass read or write data from one data mover to another.
In a data storage network in which file locks and metadata are distributed to clients and the clients having the locks are permitted to directly access file data using the metadata, a problem has been found to arise when a file manager fails to receive notification of a client""s release of a file lock. The file manager may fail to receive such a notification due to a failure of the client or a failure of a network link to the client. To avoid corruption of file data, it is imperative that conflicting locks are never granted to the clients. However, any delay in a file manager concluding that a lock has been released will impact performance specifications for the system. Moreover, ambiguity in the lock status as recorded in nonvolatile memory may prevent complete recovery from a system failure.
In accordance with a first aspect, the present invention provides a method of operation in a data storage network in which file locks and file metadata are distributed from at least one file manager to network clients to permit the network clients to share access to file data in data storage. The method permitts the file manager to grant a second lock upon the file data without necessarily receiving notification from a client that it has relinquished a first lock on the file data while ensuring that conflicting locks are never granted. The method includes a client setting the beginning of a first period of time over which the client may access the file data once the first lock on the file data has been granted by the file manager, and the client sending a lock request to the file manager for obtaining the first lock on the file data. The file manager receives the lock request from the client, and responds by setting the beginning of a second period of time such that the first period of time is certain to have expired once the second period of time has expired, granting the first lock upon the file data to the client, and transmitting a lock grant message to the client. The client receives the lock grant message, and accesses the file data so long as the client""s access to the file data will be completed by expiration of the first period of time. Therefore, the file manager is free to grant a second lock upon the file data after expiration of the second period of time without conflict between the first lock upon the file data and the second lock upon the file data.
In accordance with another aspect, the invention provides a data storage network. The data storage network includes data storage and at least one file manager coupled to network clients for distributing file locks and file metadata from the file manager to the network clients to permit the network clients to share access to file data in the data storage. The file manager is permitted to grant a second lock upon the file data without necessarily receiving notification from a client that it has relinquished a first lock on the file data while ensuring that conflicting locks are never granted. A network client and the lock manager are programmed to grant, use, and release the first lock on the file data by: (a) the client setting the beginning of a first period of time over which the client may access the file data once the first lock on the file data has been granted by the file manager, and the client sending a lock request to the file manager for obtaining the first lock on the file data; (b) the file manager receiving the lock request from the client, and responding by setting the beginning of a second period of time such that the first period of time is certain to have expired once the second period of time has expired, and granting the first lock upon the file data to the client, and transmitting a lock grant message to the client; and (c) the client receiving the lock grant message, and accessing the file data so long as the client""s access to the file data will be completed by expiration of the first period of time. Therefore, the file manager is free to grant a second lock upon the file data after expiration of the second period of time without conflict between the first lock upon the file data and the second lock upon the file data.
In accordance with still another aspect, the invention provides a file manager for use in a data storage network in which file locks and file metadata are distributed from the file manager to the network clients to permit the network clients to share access to file data in the data storage. The file manager includes a processor, a memory coupled to the processor for execution of a program contained in the memory, and a network port for coupling the processor to the network clients for the distribution of the file locks and the file metadata to the clients. The program is executable by the processor for the file manager receiving a lock request from the client, and responding by setting the beginning of a period of time such that the period of time is certain to have expired once the client relinquishes a lock upon the file data, granting the lock upon the file data, and transmitting a lock grant message to the client.
In accordance with yet another aspect, the invention provides a client for use in a data storage network including at least one file manager distributing file locks and file metadata from the file manager to network clients to permit the network clients to share access to file data in data storage. The client includes a processor, a memory coupled to the processor for execution of a program contained in the memory, and a network port for coupling the processor to the file manager for receiving file locks and the file metadata from the file manager. The program is executable by the processor for the client setting the beginning of a period of time over which the client may access the file data once a lock on the file data has been granted by the file manager, and the client sending a lock request to the file manager for obtaining the lock on the file data. The program is further executable by the processor for the client receiving a lock grant message from the file manager, and accessing the file data so long as the client""s access to the file data will be completed by expiration of the period of time.
In accordance with still another aspect, the invention provides a program storage device containing a program for a file manager in a data storage network in which file locks and file metadata are distributed from the file manager to the network clients to permit the network clients to share access to file data in the data storage. The program is executable by the file manager for the file manager receiving a lock request from the client, and responding by setting the beginning of a period of time such that the period of time is certain to have expired once the client relinquishes a lock upon the file data, and granting the lock upon the file data, and transmitting a lock grant message to the client.
In accordance with a final aspect, the invention provides a program storage device containing a program for a client for use in a data storage network including at least one file manager distributing file locks and file metadata from the file manager to network clients to permit the network clients to share access to file data in data storage. The program is executable by the client for setting the beginning of a period of time over which the client may access the file data once a lock on the file data has been granted by the file manager, and the client sending a lock request to the file manager for obtaining the lock on the file data. The program is further executable by the client for receiving a lock grant message from the file manager, and accessing the file data so long as the client""s access to the file data will be completed by expiration of the period of time.